﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace h1
{
    public partial class Form_message : Form
    {
        string otherMessage;
        public Form_message()
        {
            InitializeComponent();
        }
        public Form_message(string errorType, string message)
        {
            InitializeComponent();
            label1.Text = errorType;
            label2.Text =message;    
        }
        public Form_message(string errorType, string message, string message2,int type)
        {
            InitializeComponent();
            label1.Text = errorType;
            label2.Text = message;
            switch (type)
            {
                case 0:
                    button2.Visible = true;
                    break;
                default: 
                    button2.Visible = false;
                    break;
            }
            otherMessage = message2;
        }
        private void Form_message_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form_setMibao fm = new Form_setMibao(otherMessage);
            fm.ShowDialog();
            this.Close();
        }
    }
}
